POST
/
cortex
/
indices
curl --request POST \
  --url https://api.sophra.org/api/cortex/indices \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "{{test_index_name}}",
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 1,
    "analysis": {
      "analyzer": {
        "default": {
          "type": "standard",
          "stopwords": "_english_"
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "title": {
        "type": "text",
        "analyzer": "standard",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "content": {
        "type": "text",
        "analyzer": "standard",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "abstract": {
        "type": "text",
        "analyzer": "standard",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }
      },
      "embeddings": {
        "type": "dense_vector",
        "dims": 3072,
        "index": true,
        "similarity": "cosine",
        "index_options": {
          "type": "hnsw",
          "m": 16,
          "ef_construction": 100
        }
      },
      "authors": {
        "type": "keyword"
      },
      "tags": {
        "type": "keyword"
      },
      "source": {
        "type": "keyword"
      },
      "processing_status": {
        "type": "keyword"
      },
      "metadata": {
        "type": "object",
        "enabled": true
      },
      "evaluation_score": {
        "properties": {
          "relevance": {
            "type": "float"
          },
          "credibility": {
            "type": "float"
          },
          "clarity": {
            "type": "float"
          },
          "actionability": {
            "type": "float"
          },
          "aggregate": {
            "type": "float"
          }
        }
      },
      "created_at": {
        "type": "date"
      },
      "updated_at": {
        "type": "date"
      },
      "vectorized_at": {
        "type": "date"
      }
    }
  }
}'
"<any>"

Body

application/json · object

Response

200 - application/json

Successful response

The response is of type any.